/**
 * Created by hejg on 2018/5/7.
 */
import React, {Component} from 'react';
import {
    View,
    StyleSheet, Platform,
    Text, StatusBar
} from 'react-native';
import FontAwesome from 'react-native-vector-icons/FontAwesome';
import Header from '../../components/Header';
import Style from '../../components/Style';

export default class MmsScreen extends Component {
    static navigationOptions = {
        // title: 'Lots of features here',
        header: null,
        tabBarIcon: ({focused, tintColor}) => {
            return <FontAwesome name={`envelope-o${focused ? '' : ''}`} size={25} color={Style.color.yellow}/>;
        },
        tabBarLabel: '彩信'
    };

    componentDidMount() {
        this._navListener = this.props.navigation.addListener('didFocus', () => {
            Platform.OS === 'android' && StatusBar.setBackgroundColor(Style.color.blue);
        });
    }

    componentWillUnmount() {
        this._navListener.remove();
    }

    render() {
        return (
            <View style={styles.container}>
                <Header headerTitle="彩信" headerLeft={<View/>}/>
                <Text>彩信相关功能尚未开放</Text>
                {/*<Button title="跳转到首页" onPress={this._showMoreApp} style={{marginVertical:5}}/>*/}
                {/*<StatusBar barStyle="default" />*/}
            </View>
        );
    }

    _showMoreApp = () => {
        this.props.navigation.openDrawer();
    };
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: Style.color.screen
    },
});